﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.FYBZ
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.FYBZ;

    public class wf_fybz_detail_map : ClassMapping<wf_fybz_detail>
    {
        public wf_fybz_detail_map()
        {
            Id(x => x.r_id, map =>
            {
                map.Length(40);
                map.Column("r_id");
            });
            Property(x => x.is_valid, map => map.Column("is_valid"));
            Property(x => x.create_date, map => map.Column("create_date"));
            
            //费用所属费用类型
            ManyToOne(x => x.fy_type, map =>
            {
                map.Column("fylx_id");
            });

            Property(x => x.fyje, map => map.Column("fyje"));
            Property(x => x.fylx, map => map.Column("fylx"));
            Property(x => x.fymc, map => map.Column("fymc"));

            //详细记录所属费用报账记录
            ManyToOne(x => x.this_wf_fybz, map =>
            {
                map.Column("n_id");
            });

            Table("wf_fybz_detail");

            SchemaAction(NHibernate.Mapping.ByCode.SchemaAction.None);
        }
    }
}
